package com.oocl.o2o.client.db;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.oocl.o2o.client.entity.FoodType;
import com.oocl.o2o.client.service.FoodTypeService;

/**
 * @description: 
 * @author  XIEMI2
 * @date Aug 13, 2017 7:58:00 PM
 * @version 1.0
 */
public class FoodTypeDB {
	
	@Autowired
	private FoodTypeService foodTypeService;
	
	public static List<FoodType> foodTypes = new ArrayList<FoodType>();
	
	public void loadFoodTypes(){
		foodTypes = foodTypeService.findAll();
		for(FoodType f:foodTypes){
			System.out.println(f.toString());
		}
	}

	public static List<FoodType> getFoodTypes() {
		return foodTypes;
	}

	public static void setFoodTypes(List<FoodType> foodTypes) {
		FoodTypeDB.foodTypes = foodTypes;
	}
	
	
}


